<%@ page contentType="text/html; charset=utf-8" language="java" isELIgnored="false" %>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
    String path = request.getContextPath();
%>
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="content-type" content="text/html; charset=UTF-8">
            <style></style>
            <title>贸易单证指南</title>
            <link href="${pageContext.request.contextPath}/css/screen.css" type="text/css" rel="stylesheet">
                <link href="${pageContext.request.contextPath}/css/selects.css" type="text/css" rel="stylesheet">
                    <link rel="shortcut icon" href="${pageContext.request.contextPath}/images/dan.ico"></link>
                    <script type="text/javascript">
                        function sumbit()
                        {
                           
                            var fileName=document.getElementById("inputValue").value;
                                if(CheckForm(fileName))
                                {
                                   if(Len(fileName)<50)
                                       {
                                            document.form.sumbit;      
                                       }
                                                    
                                }
                                else
                                    return false;
                         
                        }
                        function Len(str)
                        {
                            var i,sum;
                            sum=0;
                            for(i=0;i<str.length;i++)
                            {
                                if ((str.charCodeAt(i)>=0) && (str.charCodeAt(i)<=255))
                                    sum=sum+1;
                                else
                                    sum=sum+2;
                            }
                            return sum;
                        }
               
            function    contain(str,charset)//    字符串包含测试函数
            {  
                var    i;
                for(i=0;i<charset.length;i++)
                    if(str.indexOf(charset.charAt(i))>=0)
                        return    true;
                return    false;
            }
         
          function    CheckForm(str)
            {  
        
                if((contain(str,"+|&;$@'\"%()><")))
                {  
                   
          
                    return    false;
                }
                return    true;
            }
                    </script>

                    </head>
                    <body>
                        <div id="dmLayer" style="position: absolute; width: 10px; height: 16px; z-index: 9998; display: none">
                            <table id="dmBody" style="font-size: 9pt;" class="border_1" border="0" cellpadding="0" cellspacing="0" width="72">
                                <tbody>
                                    <tr codeid="111" class="bj_g" bgcolor="white"><td width="100%">站内搜索</td> </tr>
                                </tbody>
                            </table>
                        </div>


                        <style type="text/css">
                            body {
                                margin:0 auto;
                                /*background: url(image/body_bg.jpg) no-repeat center top;*/
                                background-color: #F0F3FA;
                            }
                            html {
                                background-color: #F0F3FA;
                            }
                        </style>

                        <div id="header" style="width: auto;">
                            <div id="top_box">



                            </div>
                        </div>
						

					<div style="width: 960px; margin: 0 auto;">
                        <div id="index_container" style="margin: 0; padding: 0; background: url(image/body_bg.jpg) no-repeat center top; height: 210px;">
                            <!--<div id="index_logo"></div>-->
                        </div>

                        <div class="div_box_1" style="margin-top: 20px; margin-bottom: 40px;">
                            <div class="box_2 right">
                                <s:form action="findlist" method='post' theme="simple" name="form" namespace="/document">
                                     
                                    <div class="seee_box left">
                                        <div class="seee_box_down">
                                            <span>
                                                <input id="searchType" class="select_text_h" value="单证名称" size="6" name="test2" type="button">
                                            </span>
                                        </div>        		
                                        <div class="search_input">
                                      
                                            <input id="inputValue" name="document.name" class="input_text" type="text">		
                                               
                                        </div>        		
                                        <div class="search_input_box">

                                            <input name="submit" class="button_style111" id="submit" value=" 搜 索"  type="submit" onclick="sumbit()" >
                                        </div>
                                    </div>  
                                </s:form>
                            </div>
                        </div>


                        <style type="text/css">
                            .index_nav { margin: 20px auto 120px auto; margin: 20px auto 45px auto\9; width: 500px; }
                            .index_nav ul li { float: left; width: 100px; height: 30px; line-height: 30px; font-size: 14px; text-decoration: none; text-align: center; }
                            .index_nav ul li a { margin: 0; padding: 0; width: auto; }
                            .index_nav_fudong { background: none repeat scroll 0 0 #FFFFFF; border: 3px solid #C8D8EE; height: auto; left: 153px; line-height: 23px; position: absolute; top: 315; width: 500px; z-index: 20; }
                            .index_nav_table { border: 1px solid #0E54A9; }
                            .index_nav_table th, .index_nav_table td { line-height: 23px !important; }
                            .index_nav_table a:link, .index_nav_table a:visited { background: none repeat scroll 0 0 transparent !important; font-size: 12px !important; font-weight: 200 !important; line-height: 25px !important; margin: 0 !important; padding: 0 !important; white-space: nowrap; width: auto !important; text-decoration: none; }
                        </style>
                        <script src="${pageContext.request.contextPath}/js/jquery-1.6.1.min.js" type="text/javascript"></script>
                        <script type="text/javascript">
                            $(document).ready(function(){
								var userAgent = window.navigator.userAgent.toLowerCase();
								$.browser.msie9 = $.browser.msie && /msie 9\.0/i.test(userAgent);
								$.browser.msie8 = $.browser.msie && /msie 8\.0/i.test(userAgent);
								$.browser.msie7 = $.browser.msie && /msie 7\.0/i.test(userAgent);
								$.browser.msie6 = !$.browser.msie8 && !$.browser.msie7 && $.browser.msie && /msie 6\.0/i.test(userAgent);

                                $(".index_nav_a").mouseover(function(){
                                    $(this).next("div").css("display", "block");
                                    var offset = $(this).offset();
									$(this).next("div").css({top: offset.top + 15, left: offset.left - 200}).show();
                                    
                                });
                                $(".index_nav_a").mouseout(function(){
                                    $(this).next("div").css("display", "none");
                                });
                                $(".index_nav_fudong").mouseover(function(){
                                    $(this).css("display", "block");
                                });
                                $(".index_nav_fudong").mouseout(function(){
                                    $(this).css("display", "none");
                                });
							});

                            function gohref(urls) {
                            
                                window.open(urls);
                            }

                        </script>
                                <script language="javascript">
            function isIE(){ //ie? 
                if (window.navigator.userAgent.toLowerCase().indexOf("msie")>=1) 
                    return true; 
                else 
                    return false; 
            } 
 
            if(!isIE()){ //firefox innerText define
                HTMLElement.prototype.__defineGetter__(     "innerText", 
                function(){
                    var anyString = "";
                    var childS = this.childNodes;
                    for(var i=0; i<childS.length; i++) {
                        if(childS[i].nodeType==1)
                            anyString += childS[i].tagName=="BR" ? '\n' : childS[i].textContent;
                        else if(childS[i].nodeType==3)
                            anyString += childS[i].nodeValue;
                    }
                    return anyString;
                } 
            ); 
                HTMLElement.prototype.__defineSetter__(     "innerText", 
                function(sText){ 
                    this.textContent=sText; 
                } 
            ); 
            }
        </script>

                        <div class="index_nav">
                            <ul>
                                <s:iterator value="catTree"  var="obj" status="u">
                                    <li>
                                        <a href="${pageContext.request.contextPath}/document/listByGroupId.action?groupid=${obj.group.id}"  class="index_nav_a">${obj.group.name}</a>
                                        <div style="display: none;" class="index_nav_fudong">
                                            <table width="100%" cellspacing="0" cellpadding="0" border="0" class="index_nav_table">
                                                <s:iterator value="#obj.catTreeObjlist" var="objlist">
                                                    <tbody>
                                                        <tr>
                                                            <th valign="top" style="width: 80px; border-bottom: 1px solid #D5EBFD; text-align: center;">
                                                                <a href="${pageContext.request.contextPath}/document/listByGroupId.action?groupid=${objlist.group.id}" >${objlist.group.name}</a>
                                                            </th>
                                                            <s:if test="#objlist.typelist!=null">
                                                                <td style="width: 600px; border-bottom: 1px solid #D5EBFD;">
                                                                    <s:iterator value="#objlist.typelist" var="type">
                                                                        |<a href="${pageContext.request.contextPath}/document/findlist.action?document.documentType.id=${type.id}" >  ${type.name}</a>

                                                                    </s:iterator>
                                                                </td>
                                                            </s:if>
                                                        </tr>
                                                    </tbody>
                                                </s:iterator>
                                            </table>
                                        </div>
                                    </li>
                                </s:iterator>

                            </ul>
                        </div>

                        <s:include value="bottom_index.jsp"/>



                     </div>
                    </body>
                    </html>
